//
//  AppDelegate.swift
//  BanTang_Swift
//
//  Created by Jacky Sun on 16/8/1.
//  Copyright © 2016年 syf. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    
    var window: UIWindow?

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
            self.window = UIWindow.init(frame: UIScreen.mainScreen().bounds)
        
        //1\ 设置全局的外观
        setUpApprence()
        
        self.window!.rootViewController = BTMainController.init()
        self.window?.makeKeyAndVisible()
        return true
    }
    
    // 设置全局nav和 tabbar的颜色属性
    func setUpApprence() {
        let tabbar = UINavigationBar.appearance()
        
        
        tabbar.tintColor = UIColor.orangeColor()
        // 设置文字的属性
        
//        NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];
//        textAttrs[NSForegroundColorAttributeName] = LeLeItemBlackColor;
//        textAttrs[UITextAttributeTextShadowOffset] = [NSValue valueWithUIOffset:UIOffsetZero];
//        textAttrs[NSFontAttributeName] = [UIFont boldSystemFontOfSize:17];
//        [navBar setTitleTextAttributes:textAttrs];

        
        var dict = [String: AnyObject]()
        dict[NSForegroundColorAttributeName] = UIColor.redColor()
        tabbar.titleTextAttributes = dict
        
        
        UITabBar.appearance().tintColor = UIColor.orangeColor()
    }
    

}

